package com.lmk.org.domain;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.lmk.basic.domain.BaseDomain;
import lombok.*;

import java.util.ArrayList;
import java.util.List;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class Department extends BaseDomain {
    // 部门编号
    private String sn;
    // 部门名字
    private String name;
    // 部门状态：1就是启用，0是禁用
    private Integer state;
    // 部门经理的id
    private Long manager_id;
    private Employee manager;
    // 上级部门的id
    private Long parent_id;
    private Department parent;

    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private List<Department> children = new ArrayList<>();
}
